package com.woniuxy.woniuhis.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.woniuxy.woniuhis.entity.PayIn;
import com.woniuxy.woniuhis.util.PayInDetails;

/**
 * 收款订单
 *
 */
public interface PayInMapper {
	//CRUD
	void insertPayIn(PayIn payIn);
	void deletePayInById(String payInId);
	void deletePayInByReceiptId(String receiptId);
	void updatePayIn(PayIn payIn);
	void updatePayInByReceiptId(PayIn payIn);
	PayIn selectPayInById(String payInId);
	/**
	 * beginDate-订单开始时间
	 * endDate-订单结束时间
	 *条件查询订单
	 */
	List<PayIn> selectPayIn(@Param("payIn")PayIn payIn,@Param("beginDate")Date beginDate,@Param("endDate")Date endDate);
	/**
	 * 条件查询一个患者的所有检查账单
	 */
	List<PayInDetails> selectPayInExam(PayIn payIn);
	/**
	 * 条件查询一个患者的所有药品账单
	 */
	List<PayInDetails> selectPayInReci(PayIn payIn);
	/**
	 * 条件查询一个患者的所有手术账单
	 */
	List<PayInDetails> selectPayInSurg(PayIn payIn);
	/**
	 * 条件查询一个患者的所有门诊账单
	 */
	List<PayInDetails> selectPayInOut(PayIn payIn);
	/**
	 * 条件查询押金订单
	 */
	List<PayIn> selectPayInDeposit(@Param("payIn")PayIn payIn,@Param("beginDate")Date beginDate,@Param("endDate")Date endDate);
}
